/**
 * Created by luo yu shi on 2017/5/4.
 * @flow
 */

'use strict';


var qrCodeTerminal = require('qrcode-terminal');
var ip = require("ip");
const packageJson = require('../package.json');

const debugUrl = `http://${ip.address()}:8081/jsbundles/${packageJson.name}`;
function generate(externalIp) {
    qrCodeTerminal.generate(externalIp, { small: false }, function(qrcode){
        console.log(qrcode);
        console.log('----------------------------------------');
    });
}

// local_ip();
console.log('-----------------金融App扫一扫-RN本地调试-----------------------');
console.log('新环境调试协议 h5 demo页 地址：' + debugUrl);
generate('JdJrRnDebugUrl://' + debugUrl);
// generate('JdJrRnDebugZip://rnZip://http://10.13.87.164:8082/zip_bundle/FinanceRegular.ios.bundle.zip');
// generate('JdJrRnDebugZip://rnZip://http://msjrcb.jd.com/jrmserver/client/back/downFile?key=jfs/t16/5/1190945/244542/66395fc8/590b18f5N4cfdfc10');